Coding a Commuter License

The commuter license is more complex than other types of licenses, and it is quite frequently needed. Refer to this example when you want to make a commuter license. See the topic "Commuter Licenses" for full details. This section describes the prerequisites:

Include Libraries

Licensing library specific to your platform, including the dependent libraries specific to your environment.

Include Header File(s )

lserv.h

Declare Variables
unsigned char  *license_system;
unsigned char  *publisher_name;
unsigned char  *product_name;
unsigned char  *version;
unsigned long   units_reqd=1;
unsigned char  *log_comment;
char           *Server name;
LS_CHALLENGE    challenge;
LS_HANDLE       lshandle;
int             duration=10;
int             lock_mask=0x4;
VLScommuterInfo comm_info;
API Calls

>VLSinitialize();

>VLSsetContactServer(Server_Name);

>VLSgetAndInstallCommuterCode(product_name, version, & units_reqd, & duration, &lock_mask, NULL, &challenge );

>VLSsetContactServer("no-net");

>LSRequest(license_system, publisher_name, product_name, version,&units_reqd, log_comment, &challenge, &lshandle);

>VLSgetCommuterInfo(product_name, version,0,comm_info);